using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace Obsady
{
    class CListBoxLogger : ILogger
    {
        ListBox _listBox;
        public CListBoxLogger(ListBox listBox)
        {
            _listBox = listBox;
        }

        public override void Log(object who,string str)
        {
            _listBox.Items.Add(str);
            _listBox.SetSelected(_listBox.Items.Count - 1, true);
            _listBox.SetSelected(_listBox.Items.Count - 1, false);
        }
    }
}
